#!/usr/bin/env python
#! -*- coding: utf-8 -*-
"""
logsrv
"""
import os
import logging
import logging.config

LOGCONF = os.path.join(
    os.path.dirname(os.path.abspath(__file__)), 'logsrv.conf')
# print "using local file: %s" % LOGCONF
logging.config.fileConfig(LOGCONF)


if __name__ == '__main__':
    # 使用示例
    LOG = logging.getLogger('opsmart.alc')

    LOG.debug("debug message")
    LOG.info("info message")
    LOG.warning("warn message")
    LOG.error("error message")
    LOG.critical("critical message")

    logging.getLogger("opsmart.alc").setLevel(logging.ERROR)
    LOG.debug("debug message")
    LOG.info("info message")
    LOG.warning("warn message")
    LOG.error("error message")
    LOG.critical("critical message")
